<!DOCTYPE html>
<html>
{include file="head.html"}
 
<body>
<div class="fullscreen">

<div class="topfixed">
      <div class="t_left"><a href="/index.php?m=job&a=my" class="goBack"><i class="back"></i></a></div>
      <div class="t_main">发布招聘</div>
   
    </div> 
 

<div class="paddingheight"></div>
    <form method="post" action="{$appadmin}?m=job&a=save&ajax=1" id="upload_form" class="form-horizontal ">
    <input type="hidden" name="id" value="{$data.id}" />
    
      <div class="input-row">
             
            <input type="text" name="title"  class="txt"   id="title" value="{$data.title}" placeholder="请输标题"  >
        
        </div>    
        
        
        <div class="input-row">
            
             <select name="catid" class="txt">
        <option value="0">请选择分类</option>
        {foreach item=c from=$cat_list}
                    <option value="{$c.catid}" {if $data.catid eq $c.catid or get('catid') eq $c.catid} selected="selected"{/if}>{$c.cname}</option>
                    {foreach item=c_2 from=$c.child}
                        <option value="{$c_2.catid}" {if $data.catid eq $c_2.catid or get('catid') eq $c_2.catid} selected="selected"{/if} class="o_c_2">|__{$c_2.cname}</option>
                        {foreach item=c_3 from=$c_2.child}
                        <option value="{$c_3.catid}" {if $data.catid eq $c_3.catid or get('catid') eq $c_3.catid} selected="selected"{/if} class="o_c_3"> |____{$c_3.cname}</option>
                        {/foreach}
                    {/foreach}
                    {/foreach}
        </select>
             
        </div>
        
        <div class="input-row">
        	<label>薪酬(天)</label>
            <input type="text" name="money" value="{$data.money}">  
        </div>
     	
        <div class="input-row">
        		 
        {get data=tc model=options fun=children("$city.pid","sitearea",1)}
    	<select name="cityid" class="txt">
    		<option value="0">请选择地区</option>
            {foreach item=c from=$tc}
            <option value="{$c.id}" {if $c.id eq $data.cityid} selected{/if}>{$c.title}</option>
            {if $c.child}
            {foreach item=cc from=$c.child}
            <option value="{$cc.id}" {if $cc.id eq $data.cityid} selected{/if}>|--{$cc.title}</option>
            {/foreach}
            {/if}
            {/foreach}
    	</select>
            </select>
        </div>
        
        <div class="input-row">
        	<label>详细地址</label>
        	<input type="text" name="address" value="{$data.address}" >
        </div>
        
        <div class="input-row">
        	<label>联系电话</label>
        	 <input type="text" name="telephone" value="{$data.telephone}" >
        </div>
        
        <div class="input-row">
        	<label>联系人</label>
        	 <input type="text" name="nickname" value="{$data.nickname}"  >
        </div>
        
        <div class="input-row">
        	<label>公司名称</label>
        	 <input type="text" name="company" value="{$data.company}" >
        </div>
        
        
        <div class="area-row">
             
            <div style="width:90%; margin:0 auto; margin-bottom:10px;">
            <script type="text/html" style="height:300px;" name="content" id="content">{$data.content}</script>
            </div>
      </div>
            <div class="clearfix"></div>
        </div>  
     
    <div class="pd-5">
    
      <button type="button" name="button" id="post-submit" class="global_btn submit" value="">发布招聘</button>  
    </div>
    <div style="clear:both;"></div>
    </form>
    </div>
    {include file="footer.html"}
</div>

{php loadEditor();} 
<script>
var editor=UE.getEditor('content',options);
$(function(){
	$("#post-submit").on("click",function(){
		$.post($("#upload_form").attr("action"),$("#upload_form").serialize(),function(data){
	
			if(data.error){
				skyToast(data.message);
			}else{
				skyToast("发布成功");
				setTimeout(function(){
					goBack();
				},1000);
			}
		},"json");
	});
});
</script>

</body>
</html>